# -*- coding: utf-8 -*-
from pyecharts.charts import Bar
 
 
def draw_bar(all_list):
    print("开始绘图")
    attr = ["海沧", "湖里", "集美", "思明", "翔安", "同安"]
    v0 = all_list[0]
    v1 = all_list[1]
    v2 = all_list[2]
    v3 = all_list[3]
 
    bar = Bar()
    bar.add_xaxis(attr)
    bar.add_yaxis("最小值", v0, stack="stack1")
    bar.add_yaxis("最大值", v1, stack="stack1")
    bar.add_yaxis("平均值", v2, stack="stack1")
    bar.add_yaxis("中位数", v3, stack="stack1")
    bar.render()
    print("结束绘图")